#include <stdio.h>

int sum_array(int a[static 4], int n);

int main(void)
{
    int result;
    result = sum_array((int[]){1, 2, 3, 4}, 4);
    printf("%d", result);

    return 0;
}

int sum_array(int a[static 4], int n)
{
    int b = 0, i;
    for (i = 0; i < n; i++)
    {
        b += a[i];
    }

    return b;
}